﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RSTAi.Platform.GrpcService.Models
{
    [Table("Product")]
    public class Product
    {
        public Product() {
            this.ProductSteps = new List<ProductStep>();
        }
        [Key]
        public long ProductNo { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; } = "";
        /// <summary>
        /// 调用ID
        /// </summary>
        public int CallId { get; set; }
        /// <summary>
        /// 工位号
        /// </summary>
        public string? StationId { get; set; } = string.Empty;

        /// <summary>
        /// 产品流程
        /// </summary>
        [ForeignKey("ProductNo")]
        public virtual List<ProductStep> ProductSteps { get; set; }

        

    }
}
